package com.dsg.service.bank;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsg.entity.account.DsgAccountTrade;
import com.dsg.entity.bank.DsgBankDetail;
import com.dsg.entity.bank.DsgBankRecord;
import com.dsg.service.apply.IDsglService;

import java.util.List;

/**
 * <p>
 * 銀行往來明細資料 服务类
 * </p>
 *
 * @author system
 * @since 2020-07-12
 */
public interface IDsgBankDetailService extends IService<DsgBankDetail>, IDsglService<DsgBankDetail> {

    /**
     * 上載銀行過數
     *
     * @param dsgAccountTrade
     */
    void bankAccount(DsgAccountTrade dsgAccountTrade);

    /**
     * 查詢銀行往來明細資料
     *
     * @param page
     * @param dsgBankDetail
     * @return
     */
    Page<DsgBankDetail> selectByDetailList(Page<DsgBankDetail> page, DsgBankDetail dsgBankDetail);

    /**
     * 上載過數結果狀態
     *
     * @param idList 主键
     * @param status 3：成功 4：失敗
     * @return
     */
    void updateStatus(String idList, Integer status);

    /**
     * 銀行返回回寫交易賬目和咭總賬
     * @param dsgBankRecord
     * @param list
     */
    void bankCountingResults(DsgBankRecord dsgBankRecord, List<DsgBankDetail> list);

    /**
     * 銀行往來過數檔案主鍵查詢交易賬目明細
     *
     * @param oid
     * @return
     */
    List<DsgAccountTrade> selectDsgAccountTradeList(String oid);

}
